<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Add Item</title>
<script type="text/javascript" src="../script/jquery_2.0.3.js"></script>
<script>
	$(document).ready(function(e) {
        $("#addbtn").click(function(){
			var pname=$("#pnametxt").val();
			var pcode=$("#pcodetxt").val();
			var price=$("#pricetxt").val();
			var order=$("#ordertxt").val();
			var desc=$("#desctxt").val();
			if(pname!="" && pcode!="" && price!="" && order!="" && desc!=""){
				$("#msg").load("../action/Additem.php",
								{
									'pname':pname,
									'pcode':pcode,
									'price':price,
									'order':order,
									'desc':desc
									});
			}else{
				alert("Please input require field");
				}
		});
    });

</script>
<style type="text/css">
table{
	font:Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
	font-size:17px;
	}
	#msg{
		padding-left:150px;
		padding-top:60px;
		}
</style>
</head>

<body>
<table width="500" cellspacing="10">
	<tr>
    	<td width="160">Product Name</td><td><input type="text" id="pnametxt" size="40"></td>
    </tr>
    <tr>
    	<td>Code</td><td><input type="text" id="pcodetxt" size="40"></td>
    </tr>
    <tr>
    	<td>Price</td><td><input type="text" id="pricetxt" size="40"></td>
    </tr>
    <tr>
    	<td>reorder level</td><td><input type="text"  id="ordertxt" size="40"></td>
    </tr>
    <tr>
    	<td>Description</td><td><textarea rows="4" cols="29" id="desctxt"></textarea>
        
        </td>
    </tr>
    <tr>
    	<td></td><td><input type="button" id="addbtn" value="Add Item"></td>
    </tr>
</table>
<div id="msg"></div>
</body>
</html>